#ifndef ZERO_INIT_H_INCLUDED
#define ZERO_INIT_H_INCLUDED

template<class T>
class zero_init : public T
{
public:
	zero_init()
	{
		memset((T*)this, 0, sizeof(T));
	}
	zero_init<T> & operator = (const T & newVal)
	{
		(*(T*)this) = newVal;
		return *this;
	}
};

template<class T>
void Zeroize(T & t)
{
	memset( &t, 0, sizeof(t));
}

#endif
